//
//  WodejifenTableViewCell.m
//  tianjin
//
//  Created by 鞠超 on 16/8/11.
//  Copyright © 2016年 jc. All rights reserved.
//

#import "WodejifenTableViewCell.h"

@implementation WodejifenTableViewCell

- (instancetype )initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if(self)
    {
        [self p_setupView];
    }
    
    return self;
}

- (void )p_setupView
{
    self.date = [[UILabel alloc] init];
    self.date.text = @"2019.10.13";
    [self.contentView addSubview:self.date];
    
    self.jifen = [[UILabel alloc] init];
    self.jifen.text = @"+10";
    self.jifen.textAlignment = NSTextAlignmentRight;
    [self.contentView addSubview:self.jifen];
    
    self.view_line = [[UIView alloc] init];
    self.view_line.backgroundColor = [UIColor groupTableViewBackgroundColor];
    [self.contentView addSubview:self.view_line];
}

- (void )layoutSubviews
{
    [super layoutSubviews];
    
    CGFloat length_x = (SCREEN_WIDTH - 20) / 2;
    
    self.date.frame = CGRectMake(10, 15, length_x, 20);
    
    self.jifen.frame = CGRectMake(CGRectGetMaxX(self.date.frame), 15, length_x, 20);
    
    self.view_line.frame = CGRectMake(0, 49, SCREEN_WIDTH, 1);
}




@end
